package com.alan.app.chat;

import tomkitty.*;

public class TestTurdlet extends Turdlet {

	public void doit() {
		//a lot of this stuff could be wrapped with a Page class or something
		//basic page defining shit
		Tag html = new Tag("html");
		Tag head = new Tag("head");
		Tag title = new Tag("title");
		Tag body = new Tag("body");
		Tag h1 = new Tag("h1");
		Tag img = new Tag("img");
		
		//add some content
		title.setContent("Tag Test");
		h1.setContent("Hello Kitty");
		
		//set some attributes
		img.setAttribute("src", "http://www.bactroid.net/~fuzzcat/wiki/images/7/7d/Hello_kitty-starry_angel.jpg");
		
		//put the page together
		html.add(head);
			head.add(title);
		html.add(body);
			body.add(h1);
			body.add(img);
			
		//output
		try {
			println(html.render());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
